package com.huadi.cmcc.utils;

import cn.hutool.crypto.digest.MD5;

/**
 * @author czx
 * @date 2021/8/23
 */
public class MD5Util {
    /**
     * 盐
     */
    private static final String salt = "hello world";

    /**
     * 获取md5摘要
     * @param data
     * @return
     */
    public static String digest(String data) {
        final MD5 md5 = new MD5(salt.getBytes());
        return md5.digestHex(data);
    }

    public static void main(String[] args) {
        System.out.println(digest("123456"));
    }
}
